// *********User端路由*************
// Containers
import Full from '@/containers/user/Full'
// Views
import Dashboard from '@/views/user/Dashboard'
// login
import Login from '@/views/user/Login'
// 个人信息
import Userinfo from '@/views/user/Userinfo'
// api index
import ApiIndex from '@/views/user/api/Index'
export default[
  // 首页跳转user登录
  {
    path: '/',
    name: 'Home',
    redirect: '/user/login'
  },
  // user登录页面
  {
    path: '/user/login',
    name: 'UserLogin',
    component: Login
  },
  // user 后台
  {
    path: '/user',
    name: 'User',
    component: Full,
    redirect: '/user/dashboard/index',
    meta: {
      title: '首页',
      requireAuth: true
    },
    children: [
      {
        path: 'dashboard/index',
        name: 'UserDashboard',
        component: Dashboard,
        meta: {
          title: '仪表板',
          requireAuth: true
        }
      },
      {
        path: 'user/index',
        name: 'UserUserIndex',
        component: Userinfo,
        meta: {
          title: '个人信息',
          requireAuth: true
        }
      },
      {
        path: 'api/index',
        name: 'ApiIndex',
        component: ApiIndex,
        meta: {
          title: '接口管理',
          requireAuth: true
        }
      }
    ]
  }
]
